import assessCheckApi from './api'
import { axios } from '@/utils/request'
import router from '@/router/index'
import blobType from '@/common/blobType'
var menuType = blobType.menuType
var fywflcodeArr = blobType.fywflcodeArr
var fywflcode = ''


export function jcyglimpJcyFileData(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url: assessCheckApi.jcyglimpJcyFileData,
    method:'post' ,
    data:params,
    url_1:'outside',
    responseType: 'arraybuffer'
  })
}
export function jcyglexportJcyData(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url: assessCheckApi.jcyglexportJcyData,
    method:'get' ,
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
    responseType: 'arraybuffer'
  })
}


export function jcyglseeAccount(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url: assessCheckApi.jcyglseeAccount,
    method:'get' ,
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
  })
}

export function ocalityPostAction(data) {
  return axios({
    url: assessCheckApi.dict,
    method:'get' ,
    params:data,
    url_1:'outside'
  })
}

export function jcygladdAccount(data) {
  return axios({
    url: assessCheckApi.jcygladdAccount,
    method:'post' ,
    data:data,
    url_1:'outside'
  })
}

export function jcyglenableAccount(data) {
  return axios({
    url: assessCheckApi.jcyglenableAccount,
    method:'post' ,
    data:data,
    url_1:'outside'
  })
}
export function jcyglstopAccount(data) {
  return axios({
    url: assessCheckApi.jcyglstopAccount,
    method:'post' ,
    data:data,
    url_1:'outside'
  })
}
export function jcyglresetPwd(data) {
  return axios({
    url: assessCheckApi.jcyglresetPwd,
    method:'post' ,
    data:data,
    url_1:'outside'
  })
}


export function jcygldownJcyTemplate(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url: assessCheckApi.jcygldownJcyTemplate,
    method:'get' ,
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
    responseType: 'arraybuffer'
  })
}

export function dictzjflDict(params){
  return axios({
    url: assessCheckApi.dictzjflDict,
    method:'get' ,
    params:params,
    url_1:'outside',
  })
}




